#!/bin/bash

function rootfs_install()
{
	echo "[$(basename $0)] ${FUNCNAME} $@"
	sudo_cmd "mkdir -p ${L4T_TOP}/rootfs/opt/rk/"
	sudo_cmd "cp ./gpio_rkcp3an0.sh ${L4T_TOP}/rootfs/opt/rk/"
}

function rootfs_uninstall()
{
	echo "[$(basename $0)] ${FUNCNAME} $@"
	sudo_cmd "rm -rf ${L4T_TOP}/rootfs/opt/rk"
}

#############################################################

if [[ $# -le 0 ]]; then
	exit 0
fi

case $1 in
	"install" )
		rootfs_install
		;;
	"uninstall" )
		rootfs_uninstall
		;;
esac
